package com.epam.entity;

public class User extends AbstractEntity {

	private int id;
	private String login;
	private String password;
	private Role role;

	public enum Role {
		USER, ADMIN;
	}

	public User() {
		this.role = Role.USER;
	}

	public User(String login, String password) {
		this.login = login;
		this.password = password;
		this.role = Role.USER;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getLogin() {
		return login;
	}

	public void setLogin(String login) {
		this.login = login;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public Role getRole() {
		return role;
	}

	public void setRole(Role role) {
		this.role = role;
	}
	
	public String toString(User user) {
		String result = "ID: " + user.getId() + "; Login: " + user.getLogin();
		return result;
	}

}
